<template>
  <el-select 
    v-model="inputValue"
      v-bind="{
      ...$attrs,
      placeholder: $attrs.placeholder || '请选择投诉渠道'
    }" v-on="$listeners">
    <el-option v-for="item in options" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" size="small">
      <span :class="{'c-red': item.dictValue == '生产群'}">{{ item.dictValue }} {{item.dictValue == '生产群' ? '（生产专选）' : '' }}</span>
    </el-option>
  </el-select>
</template>

<script>
import inputValueMixin from '@/mixins/inputValueMixin'
import {
  getCacheData, 
} from "@/const/cacheData"
export default {
  name: 'ComplaintChannelSelect',
  mixins: [inputValueMixin],
  props: {
  },
  data() {
    return {
      options: [],
    };
  },
  methods: {
    getOptions() {
      //投诉等级列表
      getCacheData("complaintChannelList").then(res => {
        this.options = res
      })
    }
  },
  created() {
    this.getOptions()
  }
};
</script>

<style scoped lang="scss">

</style>
